window.tools={};
window.tools.getMouse=function(element){
 var mouse={x:0,y:0};
 
 element.addEventListener("mousemove",function (e){
  var x,y;
  var e=e ||window.event;
  if (e.pageX || e.pageY) {
   x=e.pageX;
   y=e.pageY;
  }
   else{
    x=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
    y=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
   }
   x-=element.offsetLeft;
   y-=element.offsetTop;
   
   mouse.x=x;
   mouse.y=y;
  
 })
 return mouse;
}

